#ifndef ___BUSINESS_OPERATION__
#define __BUSINESS_OPERATION__

//#include <atomic>
#include <map>
#include "IUtility.h"
#include "IBaseBusinessOperation.h"
#include "IPacket.h"
#include "ISysResources.h"

class CBussinessOperation : public virtual IBussinessOperation
{
INIT_CLASS_SINGLETON(CBussinessOperation)
public:
    const bool Init(const void * pvdPara, char * pszMsgTxt, int iMsgTxtSize);
	IConnect * InitConnect(const char * pszConClsName, const char * pszDbConnectTxt, char * pszDataConnectId, int iLen);
    IConnect * Connect(const char * pszDataConnectId);
    const bool RunLbmFlg(void * ptrTask, const char * pszLbmNo);
    const bool UnpackingForStkCode(void * ptrResult, void * ptrResultSet);
	const void AddDataConnectId(unsigned long long ullProId, const char * pszDataConnectId);
	const char * GetDataConnectId(unsigned long long ullProId);
	const bool DelDataConnectId(unsigned long long ullProId);

private:
    shared_ptr<IStrFun> m_ptrStrFun;
    shared_ptr<ISysFun> m_ptrSysFun;
    shared_ptr<IKcbpLbmManager> m_ptrKcbpLbmManager;
	shared_ptr<ILock> m_ptrLock;
	map<unsigned long long, string> m_mpConnectId;
};

#endif//___BUSINESS_OPERATION__